<%@ Page Title="Patient Notes" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<RMH.Entities.Patient>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Patient Notes - <%= Html.Encode(Model.LastName) + ", " + Html.Encode(Model.FirstName)%>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Patient Notes - <%= Html.Encode(Model.LastName) + ", " + Html.Encode(Model.FirstName)%></h2>

    <fieldset>
        <p>
            Last Name:
            <%= Html.Encode(Model.LastName) %>
        </p>
        <p>
            First Name:
            <%= Html.Encode(Model.FirstName) %>
        </p>
        <p>
            Middle Name:
            <%= Html.Encode(Model.MiddleName) %>
        </p>
        <p>
            Date of Birth:
            <%= Html.Encode(String.Format("{0:D}", Model.DateOfBirth)) %>
        </p>
    </fieldset>
    
    <%= Html.ValidationSummary("Edit was unsuccessful. Please correct the errors and try again.") %>

    <% using (Html.BeginForm()) {%>

        <fieldset>
            <legend>Add a Note</legend>
            <%= Html.Hidden("PatientId", Model.Id) %>
            <p>
                <label for="Note">Note:</label>
                <%= Html.TextArea("Note", null, 5, 70, null) %>
                <%= Html.ValidationMessage("Note", "*")%>
            </p>
            <p>
                <input type="submit" value="Save" />
            </p>
        </fieldset>

    <% } %>

    <%Html.RenderPartial("_Notes", Model); %>   

    <div>
        <%=Html.ActionLink("Edit", "Edit", new { id=Model.Id }) %> |
        <%=Html.ActionLink("Details", "Details", new { id=Model.Id }) %> |
        <%=Html.ActionLink("Back to List", "Index") %>
    </div>

</asp:Content>

